{
  "nbformat": 4,
  "metadata": {
    "language_info": {
      "mimetype": "text/x-python",
      "name": "python",
      "nbconvert_exporter": "python",
      "version": "3.5.3",
      "pygments_lexer": "ipython3",
      "file_extension": ".py",
      "codemirror_mode": {
        "name": "ipython",
        "version": 3
      }
    },
    "kernelspec": {
      "language": "python",
      "name": "python3",
      "display_name": "Python 3"
    }
  },
  "nbformat_minor": 0,
  "cells": [
    {
      "cell_type": "code",
      "execution_count": null,
      "source": [
        "%matplotlib inline"
      ],
      "outputs": [],
      "metadata": {
        "collapsed": false
      }
    },
    {
      "cell_type": "markdown",
      "source": [
        "\nHandle subplots with brokenaxes\n===============================\n\nIf you want to use subplots together with brokenaxes, you have to use GridSpec.\n\n\n"
      ],
      "metadata": {}
    },
    {
      "cell_type": "code",
      "execution_count": null,
      "source": [
        "from brokenaxes import brokenaxes\nfrom matplotlib.gridspec import GridSpec\nimport numpy as np\n\nsps1, sps2 = GridSpec(2,1)\n\nbax = brokenaxes(xlims=((.1, .3),(.7, .8)), subplot_spec=sps1)\nx = np.linspace(0, 1, 100)\nbax.plot(x, np.sin(x*30), ls=':', color='m')\n\nx = np.random.poisson(3, 1000)\nbax = brokenaxes(xlims=((0, 2.5), (3, 6)), subplot_spec=sps2)\nbax.hist(x, histtype='bar')"
      ],
      "outputs": [],
      "metadata": {
        "collapsed": false
      }
    }
  ]
}